package servicesImp.dictionary;

import base.IBaseMapperWithoutBLOBs;
import base.IBaseServicesWithoutBLOBsImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.dictionary.AffiliateCompanyServices;
import wt.dao.dictionary.AffiliateCompanyMapper;
import wt.entity.dictionary.AffiliateCompany;
import wt.entity.dictionary.AffiliateCompanyExample;
import wt.staticData.ShortData;
import wt.staticData.TableName;

import java.util.List;

/**
 * Created by Administrator on 2017/10/14.
 */
@Service
public class AffiliateCompanyServicesImp extends IBaseServicesWithoutBLOBsImpl<AffiliateCompany,AffiliateCompanyExample> implements AffiliateCompanyServices {
    @Autowired
    AffiliateCompanyMapper affiliateCompanyMapper;

    @Override
    public IBaseMapperWithoutBLOBs< AffiliateCompany, AffiliateCompanyExample> getMapper() {
        return this.affiliateCompanyMapper;
    }

    @Override
    public String getTableName() {
        return TableName.DIC_AFFILIATE_COMPANY;
    }

    public List<AffiliateCompany> selectLiveAffiliateCompany() throws Exception {
        AffiliateCompanyExample affiliateCompanyExample=new AffiliateCompanyExample();
        affiliateCompanyExample.createCriteria().andLiveEqualTo(ShortData.s1);
        return   selectByExample(affiliateCompanyExample);

    }
}
